package com.cx.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class StrategyExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public StrategyExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andStrategyIdIsNull() {
            addCriterion("strategy_id is null");
            return (Criteria) this;
        }

        public Criteria andStrategyIdIsNotNull() {
            addCriterion("strategy_id is not null");
            return (Criteria) this;
        }

        public Criteria andStrategyIdEqualTo(Integer value) {
            addCriterion("strategy_id =", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdNotEqualTo(Integer value) {
            addCriterion("strategy_id <>", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdGreaterThan(Integer value) {
            addCriterion("strategy_id >", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("strategy_id >=", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdLessThan(Integer value) {
            addCriterion("strategy_id <", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdLessThanOrEqualTo(Integer value) {
            addCriterion("strategy_id <=", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdIn(List<Integer> values) {
            addCriterion("strategy_id in", values, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdNotIn(List<Integer> values) {
            addCriterion("strategy_id not in", values, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdBetween(Integer value1, Integer value2) {
            addCriterion("strategy_id between", value1, value2, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdNotBetween(Integer value1, Integer value2) {
            addCriterion("strategy_id not between", value1, value2, "strategyId");
            return (Criteria) this;
        }

        public Criteria andCommunityIdIsNull() {
            addCriterion("community_id is null");
            return (Criteria) this;
        }

        public Criteria andCommunityIdIsNotNull() {
            addCriterion("community_id is not null");
            return (Criteria) this;
        }

        public Criteria andCommunityIdEqualTo(Integer value) {
            addCriterion("community_id =", value, "communityId");
            return (Criteria) this;
        }

        public Criteria andCommunityIdNotEqualTo(Integer value) {
            addCriterion("community_id <>", value, "communityId");
            return (Criteria) this;
        }

        public Criteria andCommunityIdGreaterThan(Integer value) {
            addCriterion("community_id >", value, "communityId");
            return (Criteria) this;
        }

        public Criteria andCommunityIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("community_id >=", value, "communityId");
            return (Criteria) this;
        }

        public Criteria andCommunityIdLessThan(Integer value) {
            addCriterion("community_id <", value, "communityId");
            return (Criteria) this;
        }

        public Criteria andCommunityIdLessThanOrEqualTo(Integer value) {
            addCriterion("community_id <=", value, "communityId");
            return (Criteria) this;
        }

        public Criteria andCommunityIdIn(List<Integer> values) {
            addCriterion("community_id in", values, "communityId");
            return (Criteria) this;
        }

        public Criteria andCommunityIdNotIn(List<Integer> values) {
            addCriterion("community_id not in", values, "communityId");
            return (Criteria) this;
        }

        public Criteria andCommunityIdBetween(Integer value1, Integer value2) {
            addCriterion("community_id between", value1, value2, "communityId");
            return (Criteria) this;
        }

        public Criteria andCommunityIdNotBetween(Integer value1, Integer value2) {
            addCriterion("community_id not between", value1, value2, "communityId");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(Integer value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(Integer value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(Integer value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(Integer value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(Integer value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<Integer> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<Integer> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(Integer value1, Integer value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeIsNull() {
            addCriterion("strategy_time is null");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeIsNotNull() {
            addCriterion("strategy_time is not null");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeEqualTo(Date value) {
            addCriterionForJDBCDate("strategy_time =", value, "strategyTime");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("strategy_time <>", value, "strategyTime");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeGreaterThan(Date value) {
            addCriterionForJDBCDate("strategy_time >", value, "strategyTime");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("strategy_time >=", value, "strategyTime");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeLessThan(Date value) {
            addCriterionForJDBCDate("strategy_time <", value, "strategyTime");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("strategy_time <=", value, "strategyTime");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeIn(List<Date> values) {
            addCriterionForJDBCDate("strategy_time in", values, "strategyTime");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("strategy_time not in", values, "strategyTime");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("strategy_time between", value1, value2, "strategyTime");
            return (Criteria) this;
        }

        public Criteria andStrategyTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("strategy_time not between", value1, value2, "strategyTime");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleIsNull() {
            addCriterion("strategy_title is null");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleIsNotNull() {
            addCriterion("strategy_title is not null");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleEqualTo(String value) {
            addCriterion("strategy_title =", value, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleNotEqualTo(String value) {
            addCriterion("strategy_title <>", value, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleGreaterThan(String value) {
            addCriterion("strategy_title >", value, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleGreaterThanOrEqualTo(String value) {
            addCriterion("strategy_title >=", value, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleLessThan(String value) {
            addCriterion("strategy_title <", value, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleLessThanOrEqualTo(String value) {
            addCriterion("strategy_title <=", value, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleLike(String value) {
            addCriterion("strategy_title like", value, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleNotLike(String value) {
            addCriterion("strategy_title not like", value, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleIn(List<String> values) {
            addCriterion("strategy_title in", values, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleNotIn(List<String> values) {
            addCriterion("strategy_title not in", values, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleBetween(String value1, String value2) {
            addCriterion("strategy_title between", value1, value2, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyTitleNotBetween(String value1, String value2) {
            addCriterion("strategy_title not between", value1, value2, "strategyTitle");
            return (Criteria) this;
        }

        public Criteria andStrategyPointIsNull() {
            addCriterion("strategy_point is null");
            return (Criteria) this;
        }

        public Criteria andStrategyPointIsNotNull() {
            addCriterion("strategy_point is not null");
            return (Criteria) this;
        }

        public Criteria andStrategyPointEqualTo(Integer value) {
            addCriterion("strategy_point =", value, "strategyPoint");
            return (Criteria) this;
        }

        public Criteria andStrategyPointNotEqualTo(Integer value) {
            addCriterion("strategy_point <>", value, "strategyPoint");
            return (Criteria) this;
        }

        public Criteria andStrategyPointGreaterThan(Integer value) {
            addCriterion("strategy_point >", value, "strategyPoint");
            return (Criteria) this;
        }

        public Criteria andStrategyPointGreaterThanOrEqualTo(Integer value) {
            addCriterion("strategy_point >=", value, "strategyPoint");
            return (Criteria) this;
        }

        public Criteria andStrategyPointLessThan(Integer value) {
            addCriterion("strategy_point <", value, "strategyPoint");
            return (Criteria) this;
        }

        public Criteria andStrategyPointLessThanOrEqualTo(Integer value) {
            addCriterion("strategy_point <=", value, "strategyPoint");
            return (Criteria) this;
        }

        public Criteria andStrategyPointIn(List<Integer> values) {
            addCriterion("strategy_point in", values, "strategyPoint");
            return (Criteria) this;
        }

        public Criteria andStrategyPointNotIn(List<Integer> values) {
            addCriterion("strategy_point not in", values, "strategyPoint");
            return (Criteria) this;
        }

        public Criteria andStrategyPointBetween(Integer value1, Integer value2) {
            addCriterion("strategy_point between", value1, value2, "strategyPoint");
            return (Criteria) this;
        }

        public Criteria andStrategyPointNotBetween(Integer value1, Integer value2) {
            addCriterion("strategy_point not between", value1, value2, "strategyPoint");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodIsNull() {
            addCriterion("strategy_good is null");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodIsNotNull() {
            addCriterion("strategy_good is not null");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodEqualTo(Integer value) {
            addCriterion("strategy_good =", value, "strategyGood");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodNotEqualTo(Integer value) {
            addCriterion("strategy_good <>", value, "strategyGood");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodGreaterThan(Integer value) {
            addCriterion("strategy_good >", value, "strategyGood");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodGreaterThanOrEqualTo(Integer value) {
            addCriterion("strategy_good >=", value, "strategyGood");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodLessThan(Integer value) {
            addCriterion("strategy_good <", value, "strategyGood");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodLessThanOrEqualTo(Integer value) {
            addCriterion("strategy_good <=", value, "strategyGood");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodIn(List<Integer> values) {
            addCriterion("strategy_good in", values, "strategyGood");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodNotIn(List<Integer> values) {
            addCriterion("strategy_good not in", values, "strategyGood");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodBetween(Integer value1, Integer value2) {
            addCriterion("strategy_good between", value1, value2, "strategyGood");
            return (Criteria) this;
        }

        public Criteria andStrategyGoodNotBetween(Integer value1, Integer value2) {
            addCriterion("strategy_good not between", value1, value2, "strategyGood");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}